package com.zlx.store.goods.controller;

import com.zlx.store.common.results.HttpResp;
import com.zlx.store.common.constant.RespCode;
import com.zlx.store.goods.service.HotGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RestController
@RequestMapping("/api/hotGoods")
public class HotGoodsController {
    @Autowired
    HotGoodsService hotGoodsService;
    @PostMapping("addByManuel")
    public HttpResp addByManuel(@RequestBody List<Long> ids){
        List<Long> result=hotGoodsService.addHotGoods(ids);
        return HttpResp.httpResp(RespCode.ITEM_OPERATION_SUCCESS,result,new Date());
    }


}
